﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

namespace HobSoft.SoccerBet2014.Domain.Core
{
    using Domain.Models.Core;

    public interface IReadWriteRepository<T> : IReadonlyRepository<T> where T : class,IModel
    {
        T AddOrUpdate(T model);
        int AddOrUpdate(IList<T> models);
        bool Delete(T model);
        bool Delete(params object[] id);
        int DeleteMany(Expression<Func<T, bool>> predicate);
        int Update(Expression<Func<T, bool>> predicate, Expression<Func<T, T>> updateExpression);
    }

}
